package windows;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Point;
import java.util.Vector;

import main.ImageLibrary;
import main.VirtualRoom;

import base.Button;
import base.Window;

public class TestWindow extends Window {

	private Vector<Button> buttons = new Vector<Button>( );
	public TestWindow( )
	{
		super( "Test Window" , "Favorites" , "Bedroom[0]" , "Bedroom[1]" , "Kitchen[0]", "Uncategorized" );
		buttons.add( new Button( "Button 1" , new Point( 25 , 12 ) , "Images/bunny.png" , true , true ) );
		buttons.add( new Button( "Button 2" , new Point( 50 , 50 ) , "Images/bunny.png" , false , false ) );
	}
	@Override
	public void draw(Graphics2D g2d) {
		for( Button but : buttons )
			but.draw( g2d );
		int centerX = VirtualRoom.width/2 - ImageLibrary.get( "bunny" ).getWidth( )/2;
		int centerY = VirtualRoom.height/2 - ImageLibrary.get( "bunny" ).getHeight( )/2;
		VirtualRoom.graphics.fillRect( 0 , 4 , 208 , 253 );
	}

	@Override
	public void fingerPressed(Point location) {
		for( Button but : buttons )
		{
			if( but.press( location.x , location.y ) )
				return;
		}
	}

	@Override
	public void fingerReleased(Point location) {
		for( Button but : buttons )
			but.release( );
	}

	@Override
	public void gestureHorizontal(int amount) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void gestureVertical(int amount) {
		// TODO Auto-generated method stub
		
	}

}
